﻿<script type="text/template" id="list-dept-item-template">
    <td class="text-center">
        <%= model.Order %>
    </td>
    <td>
        <%= model.Name %>
    </td>
    <td>
        <%= model.OfficeCode %>
    </td>
    <td>
        <%= model.Description %>
    </td>
    <td>
       <input type="checkbox"  <%= model.IsActive == true ? 'checked="checked"' : '' %> name = "IsActive" class="cbxIsActive" />
    </td>
    <td>
        <a href="#" class="user-list"><%= jsResources.lang.ManageDeptpartment_UserList %></a>    
    </td>
    <td>
         <a href="#" class="grid-update-dept"><%= jsResources.lang.GridEdit %></a>               
    </td>
    <td>
         <a href="#" class="grid-delete-dept"><%= jsResources.lang.GridDelete %></a>
    </td>
</script>
<script type="text/template" id="list-user-dept">
<td>
 <input type="hidden" value="<%= model.DepartmentId %>" id="DepartmentId" name="DepartmentId" />
 <input type="checkbox" <%= model.IsInDept==true? 'checked="checked"':'' %> name="IsInDept" class="cbxIsInDept" />
</td>
<td><%= model.UserName %></td>
</script>
<script type="text/template" id="dept-form-template">
    <div id="dept-form-error" class="error"></div>
    <form id="dept-form" onsubmit="return false;">
        <input type="hidden" name="Node" id="Node" value="<%= model.Node %>" />
        <input type="hidden" name="ParenId" id="ParenId" value="<%= model.ParenId %>" />
        <ul class="idata-form">
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageDeptpartment_Name %>    
                </span>
                <span>
                    <input type="text" name="Name" id="Name" required value="<%= model.Name %>"/>
                </span>
            </li>
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageDeptpartment_OfficeCode %>
                </span>
                <span>                   
                    <input type="text" value ="<%= model.OfficeCode %>" name="OfficeCode" id="OfficeCode" />
                </span>
            </li>
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageDeptpartment_Description %>    
                </span>
                <span>
                    <textarea name="Description" id="Description"><%= model.Description %></textarea>
                </span>
            </li>
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageBookActive %>    
                </span>
                <span>
                    <input type="checkbox" name = "IsActive" id="IsActive" <%= model.IsActive == true ? 'checked="checked"' : '' %> />
                </span>
            </li>
        </ul>
    </form>

</script>
<script type="text/template" id="treeview-template">
    <a href='javascript:void(0);' class='tree-item' data-id='<%= model.id %>' data-node-id='<%= model.Node %>'>
        <span title='<%= model.Name%>'><%= model.Name %></span>
    </a>
</script>
